<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'xinChou.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="easyui/jquery-1.8.3.js"></script>
  <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
  <link rel="stylesheet" href="easyui/themes/icon.css" type="text/css"></link>
  <link rel="stylesheet" href="easyui/themes/default/easyui.css" type="text/css"></link>
  <script type="text/javascript">
  	$(function(){
  		$("#dg").datagrid({
  			url:"findAllXinChou",
	  			striped:true,	  			
	  			rownumbers:true,
	  			pagination:true,
	  			pageList:[10,20,50],
	  			columns:[[{
	  				title:"代码",
	  				field:"code",
	  				width:100,
	  				align:"right",
	  			},{
	  				title:"名称",
	  				field:"name",
	  				width:150,
	  				align:"center"
	  			},{
	  				title:"描述",
	  				field:"describe",
	  				width:100,
	  				align:"right"
	  			},{
	  				title:"状态",
	  				field:"status",
	  				width:100,
	  				align:"right",
	  				formatter:function (value,row,index){
						return "<a onclick='update("+row.id+")' href='javascript:void(0)'>修改</a>&nbsp;&nbsp;<a onclick='del("+row.id+")' href='javascript:void(0)'>删除</a>";
					}	  				
	  			}]],
	  			toolbar:[{text:"新增",iconCls:"icon-add",handler:function(){
	  				//add();
	  			}}]	
  		});
  	});
  </script>
  
  </head>
  
  <body>
	<table id="dg" ></table>
  </body>
</html>
